============ DISview [518] !REWRITE.TXT ============ To edit ~/spool/rewrite from the DIS Session Manager: ***************************************************************** MAIN MENU:D > CONFIGURE NET:F > ADVANCED EDITING:C -- "Edit Mail Header REWRITE file". ***************************************************************** The rewrite file (~/spool/rewrite) is read by: 1. your SMTP server when receiving incoming mail -- SMTP reads the rewrite file _before_ reading the incoming mail alias file ~/alias. 2. the mailer in the built-in KA9Q BBS when sending a mail message -- the mailer uses the file to rewrite the message address if necessary _before_ putting the message into the outgoing mail queue ~/spool/mqueue. >> Example of ~/spool/rewrite: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~/spool/rewrite *@uk.co.demon.dowrmain.demon.co.uk $1@dowrmain.demon.co.uk r ian_wade@dowrmain.demon.co.uk ian@dowrmain.demon.co.uk xyz*list@dowrmain.demon.co.uk list$1@majordomo.dmain.org ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fields in the rewrite file are separated by one or more spaces. The file may contain comment lines (starting with #) and/or blank (empty) lines to improve readability. Case does not matter; e.g. "demon" is the same as "Demon". The "*" character in the first field of each entry matches zero or more characters. The "$n" string in the second field matches the n-th "*" in the first field; i.e. "$1" matches the first "*", "$2" matches the second "*", and so on. The "r" character at the end of an entry specifies recursion; i.e. if the record matches, rewrite the address and then re-scan the file from the beginning to see if there is now another match.